<?php
$tdatasanpham=array();
	$tdatasanpham[".NumberOfChars"]=80; 
	$tdatasanpham[".ShortName"]="sanpham";
	$tdatasanpham[".OwnerID"]="";
	$tdatasanpham[".OriginalTable"]="sanpham";


	
//	field labels
$fieldLabelssanpham = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelssanpham["English"]=array();
	$fieldToolTipssanpham["English"]=array();
	$fieldLabelssanpham["English"]["masanpham"] = "Masanpham";
	$fieldToolTipssanpham["English"]["masanpham"] = "";
	$fieldLabelssanpham["English"]["tensanpham"] = "Tensanpham";
	$fieldToolTipssanpham["English"]["tensanpham"] = "";
	$fieldLabelssanpham["English"]["hinhanh"] = "Hinhanh";
	$fieldToolTipssanpham["English"]["hinhanh"] = "";
	$fieldLabelssanpham["English"]["gia"] = "Gia";
	$fieldToolTipssanpham["English"]["gia"] = "";
	$fieldLabelssanpham["English"]["madanhmuc"] = "Madanhmuc";
	$fieldToolTipssanpham["English"]["madanhmuc"] = "";
	$fieldLabelssanpham["English"]["motangangon"] = "Motangangon";
	$fieldToolTipssanpham["English"]["motangangon"] = "";
	$fieldLabelssanpham["English"]["motachitiet"] = "Motachitiet";
	$fieldToolTipssanpham["English"]["motachitiet"] = "";
	$fieldLabelssanpham["English"]["giakhuyenmai"] = "Giakhuyenmai";
	$fieldToolTipssanpham["English"]["giakhuyenmai"] = "";
	$fieldLabelssanpham["English"]["tendanhmuc"] = "Tendanhmuc";
	$fieldToolTipssanpham["English"]["tendanhmuc"] = "";
	if (count($fieldToolTipssanpham["English"])){
		$tdatasanpham[".isUseToolTips"]=true;
	}
}


	
	$tdatasanpham[".NCSearch"]=true;

	

$tdatasanpham[".shortTableName"] = "sanpham";
$tdatasanpham[".nSecOptions"] = 0;
$tdatasanpham[".recsPerRowList"] = 1;	
$tdatasanpham[".tableGroupBy"] = "0";
$tdatasanpham[".mainTableOwnerID"] = "";
$tdatasanpham[".moveNext"] = 1;




$tdatasanpham[".showAddInPopup"] = false;

$tdatasanpham[".showEditInPopup"] = false;

$tdatasanpham[".showViewInPopup"] = false;


$tdatasanpham[".fieldsForRegister"] = array();

$tdatasanpham[".listAjax"] = false;

	$tdatasanpham[".audit"] = false;

	$tdatasanpham[".locking"] = false;
	
$tdatasanpham[".listIcons"] = true;
$tdatasanpham[".edit"] = true;
$tdatasanpham[".inlineEdit"] = true;
$tdatasanpham[".view"] = true;

$tdatasanpham[".exportTo"] = true;

$tdatasanpham[".printFriendly"] = true;

$tdatasanpham[".delete"] = true;

$tdatasanpham[".showSimpleSearchOptions"] = false;

$tdatasanpham[".showSearchPanel"] = true;


$tdatasanpham[".isUseAjaxSuggest"] = true;

$tdatasanpham[".rowHighlite"] = true;


// button handlers file names

$tdatasanpham[".addPageEvents"] = false;

$tdatasanpham[".arrKeyFields"][] = "masanpham";
$tdatasanpham[".arrKeyFields"][] = "tensanpham";
$tdatasanpham[".arrKeyFields"][] = "hinhanh";
$tdatasanpham[".arrKeyFields"][] = "gia";
$tdatasanpham[".arrKeyFields"][] = "madanhmuc";
$tdatasanpham[".arrKeyFields"][] = "giakhuyenmai";

// use datepicker for search panel
$tdatasanpham[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatasanpham[".isUseTimeForSearch"] = false;

$tdatasanpham[".isUseiBox"] = false;



$tdatasanpham[".isUseInlineAdd"] = true;

$tdatasanpham[".isUseInlineEdit"] = true;
$tdatasanpham[".isUseInlineJs"] = $tdatasanpham[".isUseInlineAdd"] || $tdatasanpham[".isUseInlineEdit"];

$tdatasanpham[".allSearchFields"] = array();

$tdatasanpham[".globSearchFields"][] = "masanpham";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("masanpham", $tdatasanpham[".allSearchFields"]))
{
	$tdatasanpham[".allSearchFields"][] = "masanpham";	
}
$tdatasanpham[".globSearchFields"][] = "tensanpham";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("tensanpham", $tdatasanpham[".allSearchFields"]))
{
	$tdatasanpham[".allSearchFields"][] = "tensanpham";	
}
$tdatasanpham[".globSearchFields"][] = "hinhanh";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("hinhanh", $tdatasanpham[".allSearchFields"]))
{
	$tdatasanpham[".allSearchFields"][] = "hinhanh";	
}
$tdatasanpham[".globSearchFields"][] = "gia";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("gia", $tdatasanpham[".allSearchFields"]))
{
	$tdatasanpham[".allSearchFields"][] = "gia";	
}
$tdatasanpham[".globSearchFields"][] = "madanhmuc";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("madanhmuc", $tdatasanpham[".allSearchFields"]))
{
	$tdatasanpham[".allSearchFields"][] = "madanhmuc";	
}
$tdatasanpham[".globSearchFields"][] = "giakhuyenmai";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("giakhuyenmai", $tdatasanpham[".allSearchFields"]))
{
	$tdatasanpham[".allSearchFields"][] = "giakhuyenmai";	
}
$tdatasanpham[".globSearchFields"][] = "tendanhmuc";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("tendanhmuc", $tdatasanpham[".allSearchFields"]))
{
	$tdatasanpham[".allSearchFields"][] = "tendanhmuc";	
}


$tdatasanpham[".googleLikeFields"][] = "masanpham";
$tdatasanpham[".googleLikeFields"][] = "tensanpham";
$tdatasanpham[".googleLikeFields"][] = "hinhanh";
$tdatasanpham[".googleLikeFields"][] = "gia";
$tdatasanpham[".googleLikeFields"][] = "madanhmuc";
$tdatasanpham[".googleLikeFields"][] = "giakhuyenmai";
$tdatasanpham[".googleLikeFields"][] = "tendanhmuc";



$tdatasanpham[".advSearchFields"][] = "masanpham";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("masanpham", $tdatasanpham[".allSearchFields"])) 
{
	$tdatasanpham[".allSearchFields"][] = "masanpham";	
}
$tdatasanpham[".advSearchFields"][] = "tensanpham";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("tensanpham", $tdatasanpham[".allSearchFields"])) 
{
	$tdatasanpham[".allSearchFields"][] = "tensanpham";	
}
$tdatasanpham[".advSearchFields"][] = "hinhanh";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("hinhanh", $tdatasanpham[".allSearchFields"])) 
{
	$tdatasanpham[".allSearchFields"][] = "hinhanh";	
}
$tdatasanpham[".advSearchFields"][] = "gia";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("gia", $tdatasanpham[".allSearchFields"])) 
{
	$tdatasanpham[".allSearchFields"][] = "gia";	
}
$tdatasanpham[".advSearchFields"][] = "madanhmuc";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("madanhmuc", $tdatasanpham[".allSearchFields"])) 
{
	$tdatasanpham[".allSearchFields"][] = "madanhmuc";	
}
$tdatasanpham[".advSearchFields"][] = "motangangon";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("motangangon", $tdatasanpham[".allSearchFields"])) 
{
	$tdatasanpham[".allSearchFields"][] = "motangangon";	
}
$tdatasanpham[".advSearchFields"][] = "motachitiet";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("motachitiet", $tdatasanpham[".allSearchFields"])) 
{
	$tdatasanpham[".allSearchFields"][] = "motachitiet";	
}
$tdatasanpham[".advSearchFields"][] = "giakhuyenmai";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("giakhuyenmai", $tdatasanpham[".allSearchFields"])) 
{
	$tdatasanpham[".allSearchFields"][] = "giakhuyenmai";	
}
$tdatasanpham[".advSearchFields"][] = "tendanhmuc";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("tendanhmuc", $tdatasanpham[".allSearchFields"])) 
{
	$tdatasanpham[".allSearchFields"][] = "tendanhmuc";	
}

$tdatasanpham[".isTableType"] = "list";


	

$tdatasanpham[".isDisplayLoading"] = true;

$tdatasanpham[".isResizeColumns"] = false;





$tdatasanpham[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatasanpham[".strOrderBy"] = $gstrOrderBy;
	
$tdatasanpham[".orderindexes"] = array();

$tdatasanpham[".sqlHead"] = "SELECT sanpham.masanpham,  sanpham.tensanpham,  sanpham.hinhanh,  sanpham.gia,  sanpham.madanhmuc,  sanpham.motangangon,  sanpham.motachitiet,  sanpham.giakhuyenmai,  danhmucsanpham.tendanhmuc";
$tdatasanpham[".sqlFrom"] = "FROM sanpham  INNER JOIN danhmucsanpham ON danhmucsanpham.id = sanpham.madanhmuc";
$tdatasanpham[".sqlWhereExpr"] = "";
$tdatasanpham[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatasanpham[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatasanpham[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "masanpham";
	$tableKeys[] = "tensanpham";
	$tableKeys[] = "hinhanh";
	$tableKeys[] = "gia";
	$tableKeys[] = "madanhmuc";
	$tableKeys[] = "giakhuyenmai";
	$tdatasanpham[".Keys"] = $tableKeys;

//	masanpham
	$fdata = array();
	$fdata["strName"] = "masanpham";
	$fdata["ownerTable"] = "sanpham";
		$fdata["Label"]="Masanpham"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "masanpham";
	
		$fdata["FullName"]= "sanpham.masanpham";
	
		
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasanpham["masanpham"]=$fdata;
//	tensanpham
	$fdata = array();
	$fdata["strName"] = "tensanpham";
	$fdata["ownerTable"] = "sanpham";
		$fdata["Label"]="Tensanpham"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "tensanpham";
	
		$fdata["FullName"]= "sanpham.tensanpham";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasanpham["tensanpham"]=$fdata;
//	hinhanh
	$fdata = array();
	$fdata["strName"] = "hinhanh";
	$fdata["ownerTable"] = "sanpham";
		$fdata["Label"]="Hinhanh"; 
	
		
		$fdata["LinkPrefix"]="upload/"; 
	
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Document upload";
	$fdata["ViewFormat"]= "Document Download";
	
		
		
		
		
		
	$fdata["GoodName"]= "hinhanh";
	
		$fdata["FullName"]= "sanpham.hinhanh";
	
		
		
		
		
		
			$fdata["UploadFolder"]="upload"; 
		$fdata["Index"]= 3;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasanpham["hinhanh"]=$fdata;
//	gia
	$fdata = array();
	$fdata["strName"] = "gia";
	$fdata["ownerTable"] = "sanpham";
		$fdata["Label"]="Gia"; 
	
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "gia";
	
		$fdata["FullName"]= "sanpham.gia";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasanpham["gia"]=$fdata;
//	madanhmuc
	$fdata = array();
	$fdata["strName"] = "madanhmuc";
	$fdata["ownerTable"] = "sanpham";
		$fdata["Label"]="Madanhmuc"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="tendanhmuc";
				$fdata["LookupTable"]="danhmucsanpham";
	$fdata["LookupOrderBy"]="";
							$fdata["LookupWhere"] = 'madanhmuc=id';
													
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "madanhmuc";
	
		$fdata["FullName"]= "sanpham.madanhmuc";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 5;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasanpham["madanhmuc"]=$fdata;
//	motangangon
	$fdata = array();
	$fdata["strName"] = "motangangon";
	$fdata["ownerTable"] = "sanpham";
		$fdata["Label"]="Motangangon"; 
	
		
		
	$fdata["FieldType"]= 128;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "motangangon";
	
		$fdata["FullName"]= "sanpham.motangangon";
	
		
		$fdata["UseRTE"]=true; 
	
		
		$fdata["UseRTEFCK"] = true;
	
		
				$fdata["Index"]= 6;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=400";
		$fdata["nRows"] = 400;
			$fdata["EditParams"].= " cols=450";
		$fdata["nCols"] = 450;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		$fdata["bPrinterPage"]=true; 
	
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasanpham["motangangon"]=$fdata;
//	motachitiet
	$fdata = array();
	$fdata["strName"] = "motachitiet";
	$fdata["ownerTable"] = "sanpham";
		$fdata["Label"]="Motachitiet"; 
	
		
		
	$fdata["FieldType"]= 128;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "motachitiet";
	
		$fdata["FullName"]= "sanpham.motachitiet";
	
		
		$fdata["UseRTE"]=true; 
	
		
		$fdata["UseRTEFCK"] = true;
	
		
				$fdata["Index"]= 7;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=400";
		$fdata["nRows"] = 400;
			$fdata["EditParams"].= " cols=450";
		$fdata["nCols"] = 450;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		$fdata["bPrinterPage"]=true; 
	
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasanpham["motachitiet"]=$fdata;
//	giakhuyenmai
	$fdata = array();
	$fdata["strName"] = "giakhuyenmai";
	$fdata["ownerTable"] = "sanpham";
		$fdata["Label"]="Giakhuyenmai"; 
	
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "giakhuyenmai";
	
		$fdata["FullName"]= "sanpham.giakhuyenmai";
	
		
		
		
		
		
				$fdata["Index"]= 8;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasanpham["giakhuyenmai"]=$fdata;
//	tendanhmuc
	$fdata = array();
	$fdata["strName"] = "tendanhmuc";
	$fdata["ownerTable"] = "danhmucsanpham";
		$fdata["Label"]="Tendanhmuc"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "tendanhmuc";
	
		$fdata["FullName"]= "danhmucsanpham.tendanhmuc";
	
		
		
		
		
		
				$fdata["Index"]= 9;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatasanpham["tendanhmuc"]=$fdata;

	
$tables_data["sanpham"]=&$tdatasanpham;
$field_labels["sanpham"] = &$fieldLabelssanpham;
$fieldToolTips["sanpham"] = &$fieldToolTipssanpham;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["sanpham"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["sanpham"] = array();

$mIndex = 1-1;
			$strOriginalDetailsTable="danhmucsanpham";
	$masterTablesData["sanpham"][$mIndex] = array(
		  "mDataSourceTable"=>"danhmucsanpham"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "danhmucsanpham"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 0
	);	
		$masterTablesData["sanpham"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["sanpham"][$mIndex]["detailKeys"][]="madanhmuc";

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto28=array();
$proto28["m_strHead"] = "SELECT";
$proto28["m_strFieldList"] = "sanpham.masanpham,  sanpham.tensanpham,  sanpham.hinhanh,  sanpham.gia,  sanpham.madanhmuc,  sanpham.motangangon,  sanpham.motachitiet,  sanpham.giakhuyenmai,  danhmucsanpham.tendanhmuc";
$proto28["m_strFrom"] = "FROM sanpham  INNER JOIN danhmucsanpham ON danhmucsanpham.id = sanpham.madanhmuc";
$proto28["m_strWhere"] = "";
$proto28["m_strOrderBy"] = "";
$proto28["m_strTail"] = "";
$proto29=array();
$proto29["m_sql"] = "";
$proto29["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto29["m_column"]=$obj;
$proto29["m_contained"] = array();
$proto29["m_strCase"] = "";
$proto29["m_havingmode"] = "0";
$proto29["m_inBrackets"] = "0";
$proto29["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto29);

$proto28["m_where"] = $obj;
$proto31=array();
$proto31["m_sql"] = "";
$proto31["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto31["m_column"]=$obj;
$proto31["m_contained"] = array();
$proto31["m_strCase"] = "";
$proto31["m_havingmode"] = "0";
$proto31["m_inBrackets"] = "0";
$proto31["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto31);

$proto28["m_having"] = $obj;
$proto28["m_fieldlist"] = array();
						$proto33=array();
			$obj = new SQLField(array(
	"m_strName" => "masanpham",
	"m_strTable" => "sanpham"
));

$proto33["m_expr"]=$obj;
$proto33["m_alias"] = "";
$obj = new SQLFieldListItem($proto33);

$proto28["m_fieldlist"][]=$obj;
						$proto35=array();
			$obj = new SQLField(array(
	"m_strName" => "tensanpham",
	"m_strTable" => "sanpham"
));

$proto35["m_expr"]=$obj;
$proto35["m_alias"] = "";
$obj = new SQLFieldListItem($proto35);

$proto28["m_fieldlist"][]=$obj;
						$proto37=array();
			$obj = new SQLField(array(
	"m_strName" => "hinhanh",
	"m_strTable" => "sanpham"
));

$proto37["m_expr"]=$obj;
$proto37["m_alias"] = "";
$obj = new SQLFieldListItem($proto37);

$proto28["m_fieldlist"][]=$obj;
						$proto39=array();
			$obj = new SQLField(array(
	"m_strName" => "gia",
	"m_strTable" => "sanpham"
));

$proto39["m_expr"]=$obj;
$proto39["m_alias"] = "";
$obj = new SQLFieldListItem($proto39);

$proto28["m_fieldlist"][]=$obj;
						$proto41=array();
			$obj = new SQLField(array(
	"m_strName" => "madanhmuc",
	"m_strTable" => "sanpham"
));

$proto41["m_expr"]=$obj;
$proto41["m_alias"] = "";
$obj = new SQLFieldListItem($proto41);

$proto28["m_fieldlist"][]=$obj;
						$proto43=array();
			$obj = new SQLField(array(
	"m_strName" => "motangangon",
	"m_strTable" => "sanpham"
));

$proto43["m_expr"]=$obj;
$proto43["m_alias"] = "";
$obj = new SQLFieldListItem($proto43);

$proto28["m_fieldlist"][]=$obj;
						$proto45=array();
			$obj = new SQLField(array(
	"m_strName" => "motachitiet",
	"m_strTable" => "sanpham"
));

$proto45["m_expr"]=$obj;
$proto45["m_alias"] = "";
$obj = new SQLFieldListItem($proto45);

$proto28["m_fieldlist"][]=$obj;
						$proto47=array();
			$obj = new SQLField(array(
	"m_strName" => "giakhuyenmai",
	"m_strTable" => "sanpham"
));

$proto47["m_expr"]=$obj;
$proto47["m_alias"] = "";
$obj = new SQLFieldListItem($proto47);

$proto28["m_fieldlist"][]=$obj;
						$proto49=array();
			$obj = new SQLField(array(
	"m_strName" => "tendanhmuc",
	"m_strTable" => "danhmucsanpham"
));

$proto49["m_expr"]=$obj;
$proto49["m_alias"] = "";
$obj = new SQLFieldListItem($proto49);

$proto28["m_fieldlist"][]=$obj;
$proto28["m_fromlist"] = array();
												$proto51=array();
$proto51["m_link"] = "SQLL_MAIN";
			$proto52=array();
$proto52["m_strName"] = "sanpham";
$proto52["m_columns"] = array();
$proto52["m_columns"][] = "id";
$proto52["m_columns"][] = "masanpham";
$proto52["m_columns"][] = "tensanpham";
$proto52["m_columns"][] = "hinhanh";
$proto52["m_columns"][] = "gia";
$proto52["m_columns"][] = "madanhmuc";
$proto52["m_columns"][] = "motangangon";
$proto52["m_columns"][] = "motachitiet";
$proto52["m_columns"][] = "giakhuyenmai";
$obj = new SQLTable($proto52);

$proto51["m_table"] = $obj;
$proto51["m_alias"] = "";
$proto53=array();
$proto53["m_sql"] = "";
$proto53["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto53["m_column"]=$obj;
$proto53["m_contained"] = array();
$proto53["m_strCase"] = "";
$proto53["m_havingmode"] = "0";
$proto53["m_inBrackets"] = "0";
$proto53["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto53);

$proto51["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto51);

$proto28["m_fromlist"][]=$obj;
												$proto55=array();
$proto55["m_link"] = "SQLL_INNERJOIN";
			$proto56=array();
$proto56["m_strName"] = "danhmucsanpham";
$proto56["m_columns"] = array();
$proto56["m_columns"][] = "id";
$proto56["m_columns"][] = "tendanhmuc";
$obj = new SQLTable($proto56);

$proto55["m_table"] = $obj;
$proto55["m_alias"] = "";
$proto57=array();
$proto57["m_sql"] = "danhmucsanpham.id = sanpham.madanhmuc";
$proto57["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "danhmucsanpham"
));

$proto57["m_column"]=$obj;
$proto57["m_contained"] = array();
$proto57["m_strCase"] = "= sanpham.madanhmuc";
$proto57["m_havingmode"] = "0";
$proto57["m_inBrackets"] = "0";
$proto57["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto57);

$proto55["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto55);

$proto28["m_fromlist"][]=$obj;
$proto28["m_groupby"] = array();
$proto28["m_orderby"] = array();
$obj = new SQLQuery($proto28);

$queryData_sanpham = $obj;
$tdatasanpham[".sqlquery"] = $queryData_sanpham;

$tableEvents["sanpham"] = new eventsBase;

?>
